import request from "@/utils/request";

export function searchFriendAndGroup(friendId, groupId) {
    return request({
        url: `/online/friend/search?friendId=${friendId}&groupId=${groupId}`,
        method: "GET",
    })
}


export function agreeFriend(id) {
    return request({
        url: `/online/friend/agree?id=${id}`,
        method: "POST",
    })
}



export function TurnDown(id) {
    return request({
        url: `/online/friend?id=${id}`,
        method: "PATCH",
    })
}



export function deleteFriend(id) {
    return request({
        url: `/online/friend?id=${id}`,
        method: "DELETE",
    })
}

export function list(id) {
    return request({
        url: `/online/friend/apply/list`,
        method: "GET",
    })
}

export function put(id) {
    return request({
        url: `/online/friend?id=${id}`,
        method: "POST",
    })
}

export function myfriendlist() {
    return request({
        url: `/online/friend/list`,
        method: "GET",
    })
}

export function getFrienDetail(id) {
    return request({
        url: `/online/friend/detail?id=${id}`,
        method: "GET",
    })
}